<template>
   <div>
     <p class="recommend_title">热销推荐</p>
     <ul class="recommend_list">
       <router-link
        tag="li"
        class="recommend_item border-bottom"
        v-for="item of recommendList"
        :key="item.Id"
        :to="'/detail/' + item.id"
          >
         <img class="item_img" :src="item.imgUrl" >
         <div class="item_info">
           <p class="info_title">{{item.title}}</p>
           <p class="info_desc">{{item.desc}}</p>
           <button class="item_button">查看详情</button>
         </div>
       </router-link>
     </ul>
   </div>
</template>

<script>
export default {
  name: 'HomeRecommend',
  props: {
    recommendList: Array
  },
  data () {
    return {
    }
  }
}
</script>

<style lang="stylus" scoped>
@import '~styles/mixins.styl'
  .recommend_title
    font-size .32rem
    margin-top .2rem
    line-height .8rem
    background #eee
    text-indent .2rem
  .recommend_item
    width 100%
    display flex
    justify-content flex-start
    overflow hidden
    height 1.9rem
    .item_img
      width 1.7rem
      height 1.7rem
      padding .1rem
    .item_info
      flex 1
      min-width 0
      padding .1rem
      .info_title
        line-height 0.54rem
        font-size .32rem
        ellipsis()
      .info_desc
        line-height .4rem
        color #ccc
        ellipsis()
      .item_button
        line-height .44rem
        margin-top .16rem
        padding 0 .2rem
        border-radius .06rem
        color #fff
        background #ff9300
</style>
